home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / cli / sort1_38.lha / sort1.38 / sort.doc < prev    next >
Text File  |  1995-09-30  |  6KB  |  163 lines

  1. sort.doc    sort Version 1.38        by Rüdiger Werner
  2.  
  3. The program and files in this distribution are freely distributable,
  4. but are also copyright (c) Rüdiger Werner. They may be freely
  5. distributed as long as no more than a nominal fee is charged to cover
  6. time and copying costs.
  7. No commercial usage is permitted without written permission from the
  8. author. Everything in this distribution must be kept together, in original
  9. unmodified form.
  10. This program is 'anyware', that means if you find this program useable or
  11. if you tried it then I'd like to receive anything from you.
  12. Of course I'd be very grateful, if you want to donate the author.
  13. The money will be used for a good purpose: I know very well a small indian
  14. boy who needs to be operated quite urgent. The parents have to pay the
  15. operation themselves, but they can't afford it. This is true, really.
  16.  
  17.                       *************************
  18.  
  19. I spent a lot of time on that program, now everything is ok so far.
  20. Of course the program is improved further. If you'd like to get a new
  21. version for a tiny fee, contact me. As far as I can tell already, it
  22. will be more as double as fast as this version. Some new features will
  23. be added too, as sorting by two criterions, e.g. sort by the 20th column
  24. and additionally sorting by the first.
  25. A graphical user interface is in work too, but that may take more time,
  26. because I have to do some other things too, like studying...
  27. It will be announced in the net, when it will be ready.
  28.  
  29.                       *************************
  30.  
  31.  
  32. ***********************************************************************
  33. * Notice that the author can't be made responsible for the destroying *
  34. * or lost of data through use of this program. You use it on your own *
  35. * risc. Please read the Doc-file before using.                        *
  36. ***********************************************************************
  37.  
  38. Please contact me if you have any comments or suggestions
  39. or if you simply tried the program:
  40.  
  41.  E-Mail:  rw2@irz.inf.tu-dresden.de
  42.       wernerr@iee1.et.tu-dresden.de
  43.  
  44.  URL:     http://www.inf.tu-dresden.de/~rw2
  45.           http://eeetw0.et.tu-dresden.de:8080/~wernerr
  46.  
  47.  Mail:      Rüdiger Werner
  48.       Stresemannplatz 2
  49.       01309 Dresden
  50.       GERMANY
  51.  
  52.  
  53. CHANGES TO LAST VERSION
  54. the -s option now works also in a given range only
  55.  
  56. Description
  57. -----------
  58.  
  59. The program was written for use in Shell only.
  60. It is started either by simply typing it's name (of course it should be
  61. in the current directory or in the path) or by giving additionally switches
  62. and/or the name of the file what should be sorted.
  63.  
  64.  sort [switches] infile [infile 2 ... ] [outfile]
  65.  
  66. By typing 'sort ?' appears a short help.
  67. The specified file is opened and red in the memory. There it will be sorted
  68. and, if the switches were set, manipulated in the required way.
  69.  
  70. Switches:
  71.  
  72. -a    sorting the file in ascending order (it is optional, because default)
  73.  
  74. -c[z]    with this option the number of column can be specified, by which the
  75.     file shall be sorted. This is useful to sort e.g. the RECENT files
  76.     from Aminet by type.
  77.  
  78. -d    sorting the file in descending order
  79.  
  80. -e    all lines which are empty will be erased.
  81.  
  82. -E    after sorting all lines which are empty or more than once in a file
  83.     will be erased (of course ONE of these lines is kept in the file).
  84.  
  85. -f[y]    using this option one can specify the first line of a range to be
  86.     sorted. if this option is given, ALL actions are done ONLY within
  87.     this range. to give also the last line is not compelling
  88.     if y is bigger than the number of lines of the internal file
  89.     (all in-read files together) an error-message appears and the
  90.     program is cancelled
  91.  
  92. -g    actually the capitals and small letters are distinguished.
  93.     by setting this switch, they won't be distinguished.
  94.  
  95. -j[x]    joins x files and sort them, after that the resulting file will be
  96.     written to <outfile>
  97.  
  98. -J[x]    joins x files but they won't be sorted; the resulting file will be
  99.     written to <outfile>
  100.  
  101. -l[y]    using this option one can specify the last line of a range to be
  102.     sorted. if this option is given, ALL actions are done ONLY within
  103.     this range. to give also the first line is not compelling
  104.     if y is bigger than the number of lines of the internal file
  105.     (all in-read files together) the last line is automatically taken
  106.     as last line of the range
  107.  
  108.     if x or/and y is not given it will be asked for
  109.  
  110. -n    the file is not sorted, only empty lines are erased.
  111.  
  112. -N    the file is not sorted, only empty lines and lines with the same
  113.     contents which are side by side are erased (of course ONE line is
  114.     kept in the file).
  115.     Note that it might more useful if the file is sorted.
  116.  
  117. -o    the specified file for reading will be overwritten by the sorted
  118.     file. DANGER!!! If once overwritten the original file can't be
  119.     restored!!!
  120.  
  121. -p    all lines, which doesn't match the search pattern will be removed
  122.     the given string may be shorter than the lines, only the length of
  123.     the string will be compared
  124.  
  125. -P    all lines, which match the search pattern will be removed
  126.     see -p
  127.  
  128. -r    the file which was red will only be written in reverse order of lines
  129.  
  130. -s[c]    with this option the character c will be removed from the file.
  131.     note: if characters like " need to be removed it is advisable to give this
  132.     switch as the very last of the command line. Reason is that the following
  133.     arguments are not recognized after a " by the programm.
  134.  
  135. -x    the sorting function will be disabled
  136.  
  137.  
  138. The switches can be set at any place after the program name.
  139. If the parameter to the switch is not given, it will be asked for.
  140. The program detects contradictions between given switches to avoid possible
  141. mistakes from the user
  142.  
  143. Notice that the outfilename has to be the last of all filenames.
  144. If no outfilename is given, the first infilename plus a new ending is used
  145. for a suggestion for the outfilename.
  146.  
  147. The maximum length of a line in a file is 1024 byte.
  148. All bytes that a line is longer than this are cutted. A message appears in
  149. this case. If you need to sort longer lines, just send me a mail.
  150.  
  151. The size of the file to be sorted depends only on the size of the available
  152. memory (and on your patience). The used time is shown after sorting, just
  153. for your statistics ...
  154. I have tested the programm with hundreds of different files and no loss
  155. of data appeared.
  156. I'd be grateful for any comments, suggestions and bug reports.
  157. Well, that's all I can tell about it.
  158.  
  159.  
  160.  
  161. Rüdiger Werner
  162.  
  163.